package com.boesch.electroOffice.dataaccess.dao;

import java.util.List;

import com.boesch.electroOffice.dataaccess.common.IllegalDataAccessException;
import com.boesch.electroOffice.model.electroOffice.Measurement;
import com.boesch.electroOffice.model.electroOffice.MeasurementEntry;
import com.liferay.portal.model.User;

/**
 * This interface allocates all methods for MeasurementDaoImpl.
 * The methods are only called by the business layer.
 * If there is an error on executing the method, a illegalDataAccessException will be thrown.
 * 
 * @author Ralph Koster
 *
 */
public interface MeasurementDao {

	/**
	 * Reads measurements by appointmentId from electroOffice database.
	 * Complete Javadoc
	 * 
	 * @param int appointmentId
	 * @return List<MeasurementElectroOffice> measurements
	 * @throws IllegalDataAccessException
	 */
	public List<Measurement> readMeasurementsByAppointmentId(int appointmentId) throws IllegalDataAccessException;

	/**
	 * Reads measurement entrys by measurementId
	 * Complete Javadoc
	 * 
	 * @param int measurementId
	 * @return List<MeasurementEntryElectroOffice> measurementEntrys
	 * @throws IllegalDataAccessException
	 */
	public List<MeasurementEntry> readMeasurementEntrysByMeasurementId(int measurementId) throws IllegalDataAccessException;

	public Measurement readMeasurementById(Integer measurementId) throws IllegalDataAccessException;

	/**
	 * Saves a measurement on electroOffice database
	 * Complete Javadoc
	 * 
	 * @param Measurement measurement
	 * @return String returnCode
	 * @throws IllegalDataAccessException
	 */
	public String saveMeasurementOnDatabase(Measurement measurement, User currentUser) throws IllegalDataAccessException;

	/**
	 * Updates a measurement on electroOffice database
	 * Complete Javadoc
	 * 
	 * @param currentUser 
	 * @param Measurement measurement
	 * @return String returnCode
	 * @throws IllegalDataAccessException
	 */
	public String updateMeasurementOnDatabase(Measurement measurement, User currentUser) throws IllegalDataAccessException;
}
